package com.shuqi.download.intf;

import java.util.List;

import com.shuqi.download.database.DownloadInfo;

/**
 * 下载管理器接口
 * @author GaoPeng<gaopeng@ucweb.com>
 *
 */
public interface DownloadManagerInterface {
	
    /**
     * 添加下载任务
     * @param uid
     * @param bid
     */
    public void add(String uid,String bid);
    /**
     * 移除下载任务
     * @param uid
     * @param bid
     */
    public void remove(String uid,String bid);
    /**
     * 执行下载任务
     * @param uid
     * @param bid
     * @param url
     * @param poolSize
     * @param progressType
     * @param progressUnit
     */
    public void exec(String uid,String bid,String url,int poolSize,int progressType,int progressUnit);
    /**
     * 执行下载任务
     * @param uid
     * @param bid
     * @param url
     * @param poolSize
     */
    public void exec(String uid,String bid,String url,int poolSize);
	/**
	 * 开始下载任务
	 * @param uid
	 * @param bid
	 * @param url
	 * @param poolSize
	 * @param progressType
	 * @param progressUnit
	 */
	public void start(String uid,String bid,String url,int poolSize,int progressType,int progressUnit);
	/**
	 * 开始下载任务
	 * @param uid
	 * @param bid
	 * @param url
	 * @param poolSize
	 */
	public void start(String uid,String bid,String url,int poolSize);
	/**
	 * 开始所有下载任务
	 */
	public void startAll();
	/**
	 * 停止下载任务
	 * @param uid
	 * @param bid
	 */
	public void stop(String uid,String bid);
	/**
	 * 停止所有下载任务
	 */
	public void stopAll();
	/**
	 * 删除下载任务
	 * @param uid
	 * @param bid
	 */
	public void delete(String uid,String bid);
	/**
	 * 删除所有下载任务
	 */
	public void deleteAll();
	/**
	 * 获取下载任务
	 * @param uid
	 * @param bid
	 */
	public DownloadInfo get(String uid,String bid);
	/**
	 * 获取所有下载任务
	 */
	public List<DownloadInfo> getAll();
	
}
